/**
 * 
 */
package com.geezdata.cps.sdk3rd.wechat.method;

import java.util.Map;

import com.geezdata.cps.sdk3rd.wechat.request.WechatUnionIdRequest;
import com.geezdata.cps.sdk3rd.wechat.response.WechatUnionIdResult;
import com.google.common.collect.Maps;

/**
 * @author sszheng
 * @date 创建时间：2018年6月22日 下午5:36:49
 *
 */
public class WechatUnionId extends BaseWechat implements Wechat<WechatUnionIdRequest, WechatUnionIdResult>{
	private static final String UNION_URL = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=";
	
	private Map<String, Object> prepareParams(WechatUnionIdRequest request) {
		Map<String, Object> map = Maps.newHashMap();
		return map;
	}
	@Override
	public WechatUnionIdResult execute(WechatUnionIdRequest request) {
		Map<String, Object> params = prepareParams(request);
		return doPost(UNION_URL + request.getToken() + "&openid=" + request.getOpenId() + "&lang=zh_CN", params, WechatUnionIdResult.class);
	}

}
